import request from '@/utils/request'

// 创建回收订单
export function createOrderInfo(data) {
  return request({
    url: '/system/order-info/create',
    method: 'post',
    data: data
  })
}

// 更新回收订单
export function updateOrderInfo(data) {
  return request({
    url: '/system/order-info/update',
    method: 'put',
    data: data
  })
}

// 删除回收订单
export function deleteOrderInfo(id) {
  return request({
    url: '/system/order-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得回收订单
export function getOrderInfo(id) {
  return request({
    url: '/system/order-info/get?id=' + id,
    method: 'get'
  })
}

// 获得回收订单分页
export function getOrderInfoPage(params) {
  return request({
    url: '/system/order-info/page',
    method: 'get',
    params
  })
}
// 导出回收订单 Excel
export function exportOrderInfoExcel(params) {
  return request({
    url: '/system/order-info/export-excel',
    method: 'get',
    params,
    // responseType: 'blob'
  })
}

// 确认收货
export function confirmTake(id) {
  return request({
    url: '/system/order-info/confirmTake?id=' + id,
    method: 'get'
  })
}

// 取消订单
export function cancelOrder(data) {
  return request({
    url: '/system/order-info/cancelOrder',
    method: 'post',
    data: data
  })
}

